/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.upms.params;

import com.mt.roll.core.enums.MenuCategoryEnum;
import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.constraints.Enum;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 系统角色表
 * </p>
 *
 * @author jiff
 * @date 2018/11/22
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "系统角色", description = "用于新增和更新角色信息")
public class SysRoleParam extends BaseParam {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "角色ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 角色编码
     */
    @ApiModelProperty(value = "角色编码", required = true, example = "manager")
    @NotBlank(message = "角色编码不能为空")
    private String code;

    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", required = true, example = "管理员")
    @NotBlank(message = "角色名称不能为空")
    private String name;

    /**
     * 分类:1、pc，2、app，3、wechat，4、miniapp
     */
    @ApiModelProperty(value = "分类:1、pc，2、app，3、wechat，4、miniapp", required = true, example = "1")
    @NotNull(message = "角色分类不能为空")
    @Enum(message = "非法的角色分类", target = {MenuCategoryEnum.class})
    private Integer category;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    private String remark;


}
